package com.huitu.whht.base.core.api.wr.wfct;

import com.huitu.api.rest.AbstractApiResource;
import com.huitu.commons.PageUtils;
import com.huitu.whht.api.core.common.response.ApiResultBuilder;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiResource;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiService;
import com.huitu.whht.api.core.common.response.StatusRespBuilder;

import com.huitu.whht.base.core.api.wr.wfct.entities.WrWfctB;

import com.huitu.whht.base.core.api.wr.wfct.entities.WrWfctBQo;
import com.huitu.whht.base.core.api.wr.wfct.service.IWrWfctBService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * 说明: 自来水厂基本信息表API,表名称: WR_WFCT_B <br/>
 * 日期: 2019-04-15
 * @author LiuCW
 */
@Component
@SzyCoreApiResource
@Path("wr/wfct/b")
public class WrWfctBResource extends AbstractApiResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(WrWfctBResource.class);

    private static final String UUID = "df18c6dd-5733-457b-a1bf-df7d9e298005";

    @Override
    public String getUUID() {
        return UUID;
    }

    @Autowired
    @SzyCoreApiService
    IWrWfctBService wrWfctBService;

    /**
     * @api {get} wr/wfct/b/{wfctCd:\\w{9}} [R][G]根据主键查询
     * @apiDescription [G]根据主键查询WR_WFCT_B(自来水厂基本信息表)数据
     * @apiName (generate)select by primary key
     * @apiGroup WR_WFCT_B-自来水厂基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/wfct/b/{wfctCd}
     * @apiParam   {String}         wfctCd             【必须】自来水厂代码
     * @apiSuccess {String}         wfctCd             自来水厂代码
     * @apiSuccess {Double}         freshV             清水库容量
     * @apiSuccess {Double}         dayCap             日生产能力
     * @apiSuccess {String}         prodLtp            出厂管线
     * @apiSuccess {String}         prodLtv            出厂阀门
     * @apiSuccess {String}         inLtp              进厂原水管线
     * @apiSuccess {String}         inLtv              进厂原水阀门
     * @apiSuccess {Integer}        pump1Num           一泵房出水泵数
     * @apiSuccess {Double}         pump1H             一泵房出水泵扬程
     * @apiSuccess {Double}         pump1Q             一泵房出水泵流量
     * @apiSuccess {Integer}        pump2Num           二泵房出水泵数
     * @apiSuccess {Double}         pump2H             二泵房出水泵扬程
     * @apiSuccess {Double}         pump2Q             二泵房出水泵流量
     * @apiSuccess {String}         wsObj              供水对象
     * @apiSuccess {Double}         wsPp               供水人口
     * @apiSuccess {String}         wwCond             取水计量情况
     * @apiSuccess {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {Double}         pipeSum            管线总长
     * @apiSuccess {String}         wsReg              供水范围
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "wfctCd": null,
     * "freshV": null,
     * "dayCap": null,
     * "prodLtp": null,
     * "prodLtv": null,
     * "inLtp": null,
     * "inLtv": null,
     * "pump1Num": null,
     * "pump1H": null,
     * "pump1Q": null,
     * "pump2Num": null,
     * "pump2H": null,
     * "pump2Q": null,
     * "wsObj": null,
     * "wsPp": null,
     * "wwCond": null,
     * "ts": null,
     * "nt": null,
     * "pipeSum": null,
     * "wsReg": null
     *  }
     * }
     * @apiUse exceptions
     */
    @GET
    @Path("{wfctCd:\\w{9}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectByPrimaryKey(@PathParam("wfctCd") String wfctCd) {
        LOGGER.info("根据主键查询 自来水厂基本信息表,参数 wfctCd:{}", wfctCd);
        return Response.ok(ApiResultBuilder.create(this, wrWfctBService.selectByPrimaryKey(wfctCd))).build();
    }

    /**
     * @api {post} wr/wfct/b/list [R][G]根据条件查询
     * @apiDescription [G]根据条件查询WR_WFCT_B(自来水厂基本信息表)数据
     * @apiName (generate)select by filter
     * @apiGroup WR_WFCT_B-自来水厂基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/wfct/b/list
     * @apiParam   {List(String)}   wfctCdList         (数组)自来水厂代码
     * @apiParam   {String}         wfctCd             自来水厂代码
     * @apiParam   {Double}         freshVMin          (最小)清水库容量
     * @apiParam   {Double}         freshVMax          (最大)清水库容量
     * @apiParam   {Double}         dayCapMin          (最小)日生产能力
     * @apiParam   {Double}         dayCapMax          (最大)日生产能力
     * @apiParam   {String}         prodLtp            出厂管线
     * @apiParam   {String}         prodLtv            出厂阀门
     * @apiParam   {String}         inLtp              进厂原水管线
     * @apiParam   {String}         inLtv              进厂原水阀门
     * @apiParam   {List(Integer)}  pump1NumList       (数组)一泵房出水泵数
     * @apiParam   {Double}         pump1HMin          (最小)一泵房出水泵扬程
     * @apiParam   {Double}         pump1HMax          (最大)一泵房出水泵扬程
     * @apiParam   {Double}         pump1QMin          (最小)一泵房出水泵流量
     * @apiParam   {Double}         pump1QMax          (最大)一泵房出水泵流量
     * @apiParam   {List(Integer)}  pump2NumList       (数组)二泵房出水泵数
     * @apiParam   {Double}         pump2HMin          (最小)二泵房出水泵扬程
     * @apiParam   {Double}         pump2HMax          (最大)二泵房出水泵扬程
     * @apiParam   {Double}         pump2QMin          (最小)二泵房出水泵流量
     * @apiParam   {Double}         pump2QMax          (最大)二泵房出水泵流量
     * @apiParam   {List(String)}   wsObjList          (数组)供水对象
     * @apiParam   {Double}         wsPpMin            (最小)供水人口
     * @apiParam   {Double}         wsPpMax            (最大)供水人口
     * @apiParam   {String}         wwCond             取水计量情况
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         pipeSumMin         (最小)管线总长
     * @apiParam   {Double}         pipeSumMax         (最大)管线总长
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {String}         wfctCd             自来水厂代码
     * @apiSuccess {Double}         freshV             清水库容量
     * @apiSuccess {Double}         dayCap             日生产能力
     * @apiSuccess {String}         prodLtp            出厂管线
     * @apiSuccess {String}         prodLtv            出厂阀门
     * @apiSuccess {String}         inLtp              进厂原水管线
     * @apiSuccess {String}         inLtv              进厂原水阀门
     * @apiSuccess {Integer}        pump1Num           一泵房出水泵数
     * @apiSuccess {Double}         pump1H             一泵房出水泵扬程
     * @apiSuccess {Double}         pump1Q             一泵房出水泵流量
     * @apiSuccess {Integer}        pump2Num           二泵房出水泵数
     * @apiSuccess {Double}         pump2H             二泵房出水泵扬程
     * @apiSuccess {Double}         pump2Q             二泵房出水泵流量
     * @apiSuccess {String}         wsObj              供水对象
     * @apiSuccess {Double}         wsPp               供水人口
     * @apiSuccess {String}         wwCond             取水计量情况
     * @apiSuccess {Date}           ts                 时间戳
     * @apiSuccess {String}         nt                 备注
     * @apiSuccess {Double}         pipeSum            管线总长
     * @apiSuccess {String}         wsReg              供水范围
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "wfctCd": null,
     * "freshV": null,
     * "dayCap": null,
     * "prodLtp": null,
     * "prodLtv": null,
     * "inLtp": null,
     * "inLtv": null,
     * "pump1Num": null,
     * "pump1H": null,
     * "pump1Q": null,
     * "pump2Num": null,
     * "pump2H": null,
     * "pump2Q": null,
     * "wsObj": null,
     * "wsPp": null,
     * "wwCond": null,
     * "ts": null,
     * "nt": null,
     * "pipeSum": null,
     * "wsReg": null
     *  }]
     * }
     *
     * @apiSuccessExample 分页请求:
     * request header: Rang={max=50;size=50;field=TS DESC}
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "wfctCd": null,
     * "freshV": null,
     * "dayCap": null,
     * "prodLtp": null,
     * "prodLtv": null,
     * "inLtp": null,
     * "inLtv": null,
     * "pump1Num": null,
     * "pump1H": null,
     * "pump1Q": null,
     * "pump2Num": null,
     * "pump2H": null,
     * "pump2Q": null,
     * "wsObj": null,
     * "wsPp": null,
     * "wwCond": null,
     * "ts": null,
     * "nt": null,
     * "pipeSum": null,
     * "wsReg": null
     *  }],
     * "paging": {
     * "count": 3,
     * "total": 120,
     * "finale": false,
     * "index": 1
     * }
     * }
     * @apiUse header_rang
     * @apiUse exceptions
     */
    @POST
    @Path("list")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectList(WrWfctBQo filter) {
        PageUtils.startPageFromRang();
        LOGGER.info("根据条件查询 自来水厂基本信息表,参数 WrWfctBQo:{}", filter);
        return Response.ok(ApiResultBuilder.create(this, wrWfctBService.selectList(filter))).build();
    }

    /**
     * @api {put} wr/wfct/b [C][G]新增数据
     * @apiPrivate
     * @apiDescription [G]新增WR_WFCT_B(自来水厂基本信息表)数据
     * @apiName (generate)add data
     * @apiGroup WR_WFCT_B-自来水厂基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         wfctCd             【必须】自来水厂代码
     * @apiParam   {Double}         freshV             清水库容量
     * @apiParam   {Double}         dayCap             日生产能力
     * @apiParam   {String}         prodLtp            出厂管线
     * @apiParam   {String}         prodLtv            出厂阀门
     * @apiParam   {String}         inLtp              进厂原水管线
     * @apiParam   {String}         inLtv              进厂原水阀门
     * @apiParam   {Integer}        pump1Num           一泵房出水泵数
     * @apiParam   {Double}         pump1H             一泵房出水泵扬程
     * @apiParam   {Double}         pump1Q             一泵房出水泵流量
     * @apiParam   {Integer}        pump2Num           二泵房出水泵数
     * @apiParam   {Double}         pump2H             二泵房出水泵扬程
     * @apiParam   {Double}         pump2Q             二泵房出水泵流量
     * @apiParam   {String}         wsObj              供水对象
     * @apiParam   {Double}         wsPp               供水人口
     * @apiParam   {String}         wwCond             取水计量情况
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         pipeSum            管线总长
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wr/wfct/b
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "wfctCd": null
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "wfctCd": null
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "wfctCd": null,
     * "freshV": null,
     * "dayCap": null,
     * "prodLtp": null,
     * "prodLtv": null,
     * "inLtp": null,
     * "inLtv": null,
     * "pump1Num": null,
     * "pump1H": null,
     * "pump1Q": null,
     * "pump2Num": null,
     * "pump2H": null,
     * "pump2Q": null,
     * "wsObj": null,
     * "wsPp": null,
     * "wwCond": null,
     * "ts": null,
     * "nt": null,
     * "pipeSum": null,
     * "wsReg": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insert(WrWfctB record) {
        LOGGER.info("新增 自来水厂基本信息表,参数 WrWfctB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wrWfctBService.insertSelective(record),record))).build();
    }

    /**
     * @api {post} wr/wfct/b/insertBatch [C][G]批量新增数据
     * @apiPrivate
     * @apiDescription [G]批量新增WR_WFCT_B(自来水厂基本信息表)数据
     * @apiName (generate)addBatch data
     * @apiGroup WR_WFCT_B-自来水厂基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         wfctCd             【必须】自来水厂代码
     * @apiParam   {Double}         freshV             清水库容量
     * @apiParam   {Double}         dayCap             日生产能力
     * @apiParam   {String}         prodLtp            出厂管线
     * @apiParam   {String}         prodLtv            出厂阀门
     * @apiParam   {String}         inLtp              进厂原水管线
     * @apiParam   {String}         inLtv              进厂原水阀门
     * @apiParam   {Integer}        pump1Num           一泵房出水泵数
     * @apiParam   {Double}         pump1H             一泵房出水泵扬程
     * @apiParam   {Double}         pump1Q             一泵房出水泵流量
     * @apiParam   {Integer}        pump2Num           二泵房出水泵数
     * @apiParam   {Double}         pump2H             二泵房出水泵扬程
     * @apiParam   {Double}         pump2Q             二泵房出水泵流量
     * @apiParam   {String}         wsObj              供水对象
     * @apiParam   {Double}         wsPp               供水人口
     * @apiParam   {String}         wwCond             取水计量情况
     * @apiParam   {Date}           ts                 时间戳(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         pipeSum            管线总长
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wr/wfct/b/insertBatch
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "wfctCd": null
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "wfctCd": null
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "wfctCd": null,
     * "freshV": null,
     * "dayCap": null,
     * "prodLtp": null,
     * "prodLtv": null,
     * "inLtp": null,
     * "inLtv": null,
     * "pump1Num": null,
     * "pump1H": null,
     * "pump1Q": null,
     * "pump2Num": null,
     * "pump2H": null,
     * "pump2Q": null,
     * "wsObj": null,
     * "wsPp": null,
     * "wwCond": null,
     * "ts": null,
     * "nt": null,
     * "pipeSum": null,
     * "wsReg": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("insertBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insertBatch(List<WrWfctB> recordList) {
        LOGGER.info("批量新增 自来水厂基本信息表,参数 WrWfctB:[]", recordList);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wrWfctBService.insertBatch(recordList),recordList))).build();
    }

    /**
     * @api {put} wr/wfct/b/{wfctCd:\\w{9}}/update [U][G]根据主键修改
     * @apiPrivate
     * @apiDescription [G]根据主键修改WR_WFCT_B(自来水厂基本信息表)数据
     * @apiName (generate)update data
     * @apiGroup WR_WFCT_B-自来水厂基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         wfctCd             【必须】自来水厂代码
     * @apiParam   {Double}         freshV             清水库容量
     * @apiParam   {Double}         dayCap             日生产能力
     * @apiParam   {String}         prodLtp            出厂管线
     * @apiParam   {String}         prodLtv            出厂阀门
     * @apiParam   {String}         inLtp              进厂原水管线
     * @apiParam   {String}         inLtv              进厂原水阀门
     * @apiParam   {Integer}        pump1Num           一泵房出水泵数
     * @apiParam   {Double}         pump1H             一泵房出水泵扬程
     * @apiParam   {Double}         pump1Q             一泵房出水泵流量
     * @apiParam   {Integer}        pump2Num           二泵房出水泵数
     * @apiParam   {Double}         pump2H             二泵房出水泵扬程
     * @apiParam   {Double}         pump2Q             二泵房出水泵流量
     * @apiParam   {String}         wsObj              供水对象
     * @apiParam   {Double}         wsPp               供水人口
     * @apiParam   {String}         wwCond             取水计量情况
     * @apiParam   {Date}           ts                 【必须】时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         pipeSum            管线总长
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wr/wfct/b/{wfctCd}/update
     * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "wfctCd": null,
     * "freshV": null,
     * "dayCap": null,
     * "prodLtp": null,
     * "prodLtv": null,
     * "inLtp": null,
     * "inLtv": null,
     * "pump1Num": null,
     * "pump1H": null,
     * "pump1Q": null,
     * "pump2Num": null,
     * "pump2H": null,
     * "pump2Q": null,
     * "wsObj": null,
     * "wsPp": null,
     * "wwCond": null,
     * "ts": null,
     * "nt": null,
     * "pipeSum": null,
     * "wsReg": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{wfctCd:\\w{9}}/update")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response update(@PathParam("wfctCd") String wfctCd, WrWfctB record) {
        record.setWfctCd(wfctCd);
        LOGGER.info("根据主键修改 自来水厂基本信息表,参数 WrWfctB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wrWfctBService.updateByPrimaryKey(record)))).build();
    }

    /**
     * @api {put} wr/wfct/b/{wfctCd:\\w{9}}/update-selective [U][G]根据主键修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据主键修改WR_WFCT_B(自来水厂基本信息表)数据,只修改非null字段
     * @apiName (generate)update selected data
     * @apiGroup WR_WFCT_B-自来水厂基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         wfctCd             自来水厂代码
     * @apiParam   {Double}         freshV             清水库容量
     * @apiParam   {Double}         dayCap             日生产能力
     * @apiParam   {String}         prodLtp            出厂管线
     * @apiParam   {String}         prodLtv            出厂阀门
     * @apiParam   {String}         inLtp              进厂原水管线
     * @apiParam   {String}         inLtv              进厂原水阀门
     * @apiParam   {Integer}        pump1Num           一泵房出水泵数
     * @apiParam   {Double}         pump1H             一泵房出水泵扬程
     * @apiParam   {Double}         pump1Q             一泵房出水泵流量
     * @apiParam   {Integer}        pump2Num           二泵房出水泵数
     * @apiParam   {Double}         pump2H             二泵房出水泵扬程
     * @apiParam   {Double}         pump2Q             二泵房出水泵流量
     * @apiParam   {String}         wsObj              供水对象
     * @apiParam   {Double}         wsPp               供水人口
     * @apiParam   {String}         wwCond             取水计量情况
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         pipeSum            管线总长
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wr/wfct/b/{wfctCd}/update-selective
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "wfctCd": null,
     * "freshV": null,
     * "dayCap": null,
     * "prodLtp": null,
     * "prodLtv": null,
     * "inLtp": null,
     * "inLtv": null,
     * "pump1Num": null,
     * "pump1H": null,
     * "pump1Q": null,
     * "pump2Num": null,
     * "pump2H": null,
     * "pump2Q": null,
     * "wsObj": null,
     * "wsPp": null,
     * "wwCond": null,
     * "ts": null,
     * "nt": null,
     * "pipeSum": null,
     * "wsReg": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{wfctCd:\\w{9}}/update-selective")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateSelective(@PathParam("wfctCd") String wfctCd, WrWfctB record) {
        record.setWfctCd(wfctCd);
        LOGGER.info("根据主键修改(只修改非null字段) 自来水厂基本信息表,参数 WrWfctB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wrWfctBService.updateByPrimaryKeySelective(record)))).build();
    }

    /**
     * @api {post} wr/wfct/b/updateBatch [U][G]根据主键批量修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据批量主键修改WR_WFCT_B(自来水厂基本信息表)数据,只修改非null字段
     * @apiName (generate)updateBatch selected data
     * @apiGroup WR_WFCT_B-自来水厂基本信息表
     * @apiVersion 1.0.0
     * @apiParam   {String}         wfctCd             自来水厂代码
     * @apiParam   {Double}         freshV             清水库容量
     * @apiParam   {Double}         dayCap             日生产能力
     * @apiParam   {String}         prodLtp            出厂管线
     * @apiParam   {String}         prodLtv            出厂阀门
     * @apiParam   {String}         inLtp              进厂原水管线
     * @apiParam   {String}         inLtv              进厂原水阀门
     * @apiParam   {Integer}        pump1Num           一泵房出水泵数
     * @apiParam   {Double}         pump1H             一泵房出水泵扬程
     * @apiParam   {Double}         pump1Q             一泵房出水泵流量
     * @apiParam   {Integer}        pump2Num           二泵房出水泵数
     * @apiParam   {Double}         pump2H             二泵房出水泵扬程
     * @apiParam   {Double}         pump2Q             二泵房出水泵流量
     * @apiParam   {String}         wsObj              供水对象
     * @apiParam   {Double}         wsPp               供水人口
     * @apiParam   {String}         wwCond             取水计量情况
     * @apiParam   {Date}           ts                 时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         pipeSum            管线总长
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest  wr/wfct/b/updateBatch
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "wfctCd": null,
     * "freshV": null,
     * "dayCap": null,
     * "prodLtp": null,
     * "prodLtv": null,
     * "inLtp": null,
     * "inLtv": null,
     * "pump1Num": null,
     * "pump1H": null,
     * "pump1Q": null,
     * "pump2Num": null,
     * "pump2H": null,
     * "pump2Q": null,
     * "wsObj": null,
     * "wsPp": null,
     * "wwCond": null,
     * "ts": null,
     * "nt": null,
     * "pipeSum": null,
     * "wsReg": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("updateBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateBatch(List<WrWfctB> record) {
        LOGGER.info("根据主键批量修改(只修改非null字段) 自来水厂基本信息表,参数 WrWfctB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wrWfctBService.updateBatch(record)))).build();
    }

    /**
     * @api {delete} wr/wfct/b/{wfctCd:\\w{9}} [D][G]根据主键删除
     * @apiPrivate
     * @apiDescription [G]根据主键删除WR_WFCT_B(自来水厂基本信息表)数据
     * @apiName (generate)delete by primary key
     * @apiGroup WR_WFCT_B-自来水厂基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/wfct/b/{wfctCd}
     * @apiParam   {String}         wfctCd             【必须】自来水厂代码
     * @apiSuccess {Integer}        status             1:删除成功;0:要删除的数据不存在(可能已被删除).
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("{wfctCd:\\w{9}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response delete(@PathParam("wfctCd") String wfctCd) {
        LOGGER.info("根据主键删除 自来水厂基本信息表,参数 wfctCd:{}", wfctCd);
        Integer rows = wrWfctBService.deleteByPrimaryKey(wfctCd);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }

    /**
     * @api {delete} wr/wfct/b/by-filter [D][G]根据条件删除
     * @apiPrivate
     * @apiDescription [G]根据条件删除WR_WFCT_B(自来水厂基本信息表)数据
     * @apiName (generate)delete by filter
     * @apiGroup WR_WFCT_B-自来水厂基本信息表
     * @apiVersion 1.0.0
     * @apiSampleRequest wr/wfct/b/by-filter
     * @apiParam   {List(String)}   wfctCdList         (数组)自来水厂代码
     * @apiParam   {String}         wfctCd             自来水厂代码
     * @apiParam   {Double}         freshVMin          (最小)清水库容量
     * @apiParam   {Double}         freshVMax          (最大)清水库容量
     * @apiParam   {Double}         dayCapMin          (最小)日生产能力
     * @apiParam   {Double}         dayCapMax          (最大)日生产能力
     * @apiParam   {String}         prodLtp            出厂管线
     * @apiParam   {String}         prodLtv            出厂阀门
     * @apiParam   {String}         inLtp              进厂原水管线
     * @apiParam   {String}         inLtv              进厂原水阀门
     * @apiParam   {List(Integer)}  pump1NumList       (数组)一泵房出水泵数
     * @apiParam   {Double}         pump1HMin          (最小)一泵房出水泵扬程
     * @apiParam   {Double}         pump1HMax          (最大)一泵房出水泵扬程
     * @apiParam   {Double}         pump1QMin          (最小)一泵房出水泵流量
     * @apiParam   {Double}         pump1QMax          (最大)一泵房出水泵流量
     * @apiParam   {List(Integer)}  pump2NumList       (数组)二泵房出水泵数
     * @apiParam   {Double}         pump2HMin          (最小)二泵房出水泵扬程
     * @apiParam   {Double}         pump2HMax          (最大)二泵房出水泵扬程
     * @apiParam   {Double}         pump2QMin          (最小)二泵房出水泵流量
     * @apiParam   {Double}         pump2QMax          (最大)二泵房出水泵流量
     * @apiParam   {List(String)}   wsObjList          (数组)供水对象
     * @apiParam   {Double}         wsPpMin            (最小)供水人口
     * @apiParam   {Double}         wsPpMax            (最大)供水人口
     * @apiParam   {String}         wwCond             取水计量情况
     * @apiParam   {Date}           tsBgTm             (开始时间)时间戳
     * @apiParam   {Date}           tsEdTm             (结束时间)时间戳
     * @apiParam   {String}         nt                 备注
     * @apiParam   {Double}         pipeSumMin         (最小)管线总长
     * @apiParam   {Double}         pipeSumMax         (最大)管线总长
     * @apiParam   {String}         wsReg              供水范围
     * @apiSuccess {Integer}        status             通常1或者>1:删除成功;0:没有符合条件的数据.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("by-filter")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response deleteByFilter(WrWfctBQo filter) {
        LOGGER.info("根据条件删除 自来水厂基本信息表,参数 WrWfctBQo:{}", filter);
        Integer rows = wrWfctBService.deleteByFilter(filter);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }
}
